export const elErrorMessageTip = (message) => {
    ElMessage({
        showClose: false,
        message: message,
        type: 'error',
    })
}

export const elErrorMessageTipWithClose = (message) => {
    ElMessage({
        showClose: true,
        message: message,
        type: 'error',
    })
}

export const elSuccessMessageTip = (message) => {
    ElMessage({
        showClose: false,
        message: message,
        type: 'success',
    })
}

export const elSuccessMessageTipWithClose = (message) => {
    ElMessage({
        showClose: true,
        message: message,
        type: 'success',
    })
}

export const elMessageTip = (res) => {
    if (res.status) {
        elSuccessMessageTip(res.msg)
    } else {
        elErrorMessageTip(res.msg)
    }
}